package com.surpassun.emall.service;

import java.util.Date;
import java.util.List;

import com.surpassun.emall.exception.NoSuchProductException;
import com.surpassun.emall.model.Category;
import com.surpassun.emall.model.Country;
import com.surpassun.emall.model.Product;
import com.surpassun.emall.model.Store;

public interface ProductService extends AbstractService<Product> {

	public void addProduct(String name, String description, String longDescription,
			Store store, Date activeStartDate, Date activeEndDate, Category category, float price,
			float promoPrice, int quantity, String height, String width,
			String length, String weight, String manufacturer, Country region, boolean active);
	
	public void updateProduct(Product product, String name, String description, String longDescription,
			Store store, Date activeStartDate, Date activeEndDate, Category category, float price,
			float promoPrice, int quantity, String height, String width,
			String length, String weight, String manufacturer, Country region, boolean active);
	
	public void updateProduct(long productId, String name, String description, String longDescription,
			Store store, Date activeStartDate, Date activeEndDate, Category category, float price,
			float promoPrice, int quantity, String height, String width,
			String length, String weight, String manufacturer, Country region, boolean active) throws NoSuchProductException;
	
	public void updateProduct(Product product, String name, String description, String longDescription);
	
	public void activateProduct(Product product);
	
	public void desactivateProduct(Product product);
	
	public void changeProductPrice(Product product, float price);
	
	public void changeProductPromoPrice(Product product, float promoPrice);
	
	public void changeProductQuantity(Product product, int quantity);

	public List<Product> getProductsByCategory(long categoryId);

	public List<Product> getProductsByCity(long cityId);

	public List<Product> searchProducts(String keyword, long cityId);
}
